package com.example.shop_2207.net

import android.widget.ImageView
import androidx.databinding.BindingAdapter
import com.bumptech.glide.Glide

object ImageUtils {
    //绑定适配器
    @BindingAdapter("img_url")
    @JvmStatic
    fun loadImage(imageView: ImageView,url:String?){
        if(imageView!=null&&url!=null){
            Glide.with(imageView.context).load(url).into(imageView)
        }
    }
}